#ifndef __SHARED_LIBRARY_MANAGER_HH__
#define __SHARED_LIBRARY_MANAGER_HH__

/**
 * @file SharedLibraryManager.hh
 * @author Olgierd Humenczuk olgierdh@gmail.com
 */

namespace Common
{
    
namespace detail
{

/**
 * @struct DefualtPath
 * @brief Default search path declaration.
 */
struct DefaultPath
{
    ///default search path value
    static const char iPath[];
};

} // namespace detail
    
/**
 * @class SharedLibraryManager
 * @brief Class for managing the loaded shared libraries.
 * It is not using any patterns because it has quite uniqe behaviour.
 */
class SharedLibraryManager
{
public:
    /**
     * @brief Default ctor. Sets the search path to the default one.
     */
    explicit SharedLibraryManager( void ) : iPath( detail::DefaultPath::iPath ) {}
    
    /**
     * @brief Set path ctor. Sets the search path to the given one.
     * @param aPath search path that will be used during loading libraries.
     */
    explicit SharedLibraryManager( const std::string& aPath ) : iPath( aPath ) {}

    /**
     * @brief Default dtor.
     */
    ~SharedLibraryManager( void ) {}

    /**
     * @brief Returns search path for this library manager.
     */
    const std::string& getSearchPath( void ) const { return iPath; }

private:
    /// path to the shared library search dir
    std::string iPath;
};

} // namespace Common

#endif